/**
 * ...
 * @author Sasha
 */

package
{

import flash.display.MovieClip;
//import flash.text.StaticText;
import flash.text.TextField;

public class Ttext extends TControl
{
	public var text_field: TextField;
	
	public function get Text(): String
	{
		return text_field.text;
	}
	
	public function set Text(s: String):void
	{
		text_field.text = s;
	}
	
	public function AddHTMLLine(s: String): void
	{
		text_field.htmlText += "<p>" + s + "</p>";
	}

	public function Ttext(aText: String,  Parent: TControl = null, x: Number = 0, y: Number = 0, AutoSize: Boolean = true) 
	{
		var Pic: MovieClip = new MovieClip();

        text_field = new TextField();
        
        text_field.text = aText;
		if (AutoSize)
		  text_field.autoSize = flash.text.TextFieldAutoSize.CENTER;
		text_field.selectable = false;
		
		Pic.addChild(text_field);
		super(Pic, Parent, x, y);    

	}
	
}
}